home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  4.8 KB  |  149 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        QDOffscreen.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __QDOFFSCREEN__
  18. #define __QDOFFSCREEN__
  19.  
  20.  
  21. #ifndef __ERRORS__
  22. #include <Errors.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __QUICKDRAW__
  27. #include <Quickdraw.h>
  28. #endif
  29. /*    #include <Types.h>                                            */
  30. /*    #include <MixedMode.h>                                        */
  31. /*    #include <QuickdrawText.h>                                    */
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if GENERATINGPOWERPC
  38. #pragma options align=mac68k
  39. #endif
  40.  
  41. #ifdef __CFM68K__
  42. #pragma lib_export on
  43. #endif
  44.  
  45.  
  46. enum {
  47.     pixPurgeBit                    = 0,
  48.     noNewDeviceBit                = 1,
  49.     useTempMemBit                = 2,
  50.     keepLocalBit                = 3,
  51.     pixelsPurgeableBit            = 6,
  52.     pixelsLockedBit                = 7,
  53.     mapPixBit                    = 16,
  54.     newDepthBit                    = 17,
  55.     alignPixBit                    = 18,
  56.     newRowBytesBit                = 19,
  57.     reallocPixBit                = 20,
  58.     clipPixBit                    = 28,
  59.     stretchPixBit                = 29,
  60.     ditherPixBit                = 30,
  61.     gwFlagErrBit                = 31
  62. };
  63.  
  64. enum {
  65.     pixPurge                    = 1L << pixPurgeBit,
  66.     noNewDevice                    = 1L << noNewDeviceBit,
  67.     useTempMem                    = 1L << useTempMemBit,
  68.     keepLocal                    = 1L << keepLocalBit,
  69.     pixelsPurgeable                = 1L << pixelsPurgeableBit,
  70.     pixelsLocked                = 1L << pixelsLockedBit,
  71.     mapPix                        = 1L << mapPixBit,
  72.     newDepth                    = 1L << newDepthBit,
  73.     alignPix                    = 1L << alignPixBit,
  74.     newRowBytes                    = 1L << newRowBytesBit,
  75.     reallocPix                    = 1L << reallocPixBit,
  76.     clipPix                        = 1L << clipPixBit,
  77.     stretchPix                    = 1L << stretchPixBit,
  78.     ditherPix                    = 1L << ditherPixBit,
  79.     gwFlagErr                    = 1L << gwFlagErrBit
  80. };
  81.  
  82. typedef unsigned long GWorldFlags;
  83.  
  84. /* Type definition of a GWorldPtr */
  85. typedef CGrafPtr GWorldPtr;
  86.  
  87. extern pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld, short PixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
  88.  FOURWORDINLINE(0x203C, 0x0016, 0x0000, 0xAB1D);
  89. extern pascal Boolean LockPixels(PixMapHandle pm)
  90.  FOURWORDINLINE(0x203C, 0x0004, 0x0001, 0xAB1D);
  91. extern pascal void UnlockPixels(PixMapHandle pm)
  92.  FOURWORDINLINE(0x203C, 0x0004, 0x0002, 0xAB1D);
  93. extern pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld, short pixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
  94.  FOURWORDINLINE(0x203C, 0x0016, 0x0003, 0xAB1D);
  95. extern pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  96.  FOURWORDINLINE(0x203C, 0x0004, 0x0004, 0xAB1D);
  97. extern pascal void GetGWorld(CGrafPtr *port, GDHandle *gdh)
  98.  FOURWORDINLINE(0x203C, 0x0008, 0x0005, 0xAB1D);
  99. extern pascal void SetGWorld(CGrafPtr port, GDHandle gdh)
  100.  FOURWORDINLINE(0x203C, 0x0008, 0x0006, 0xAB1D);
  101. extern pascal void CTabChanged(CTabHandle ctab)
  102.  FOURWORDINLINE(0x203C, 0x0004, 0x0007, 0xAB1D);
  103. extern pascal void PixPatChanged(PixPatHandle ppat)
  104.  FOURWORDINLINE(0x203C, 0x0004, 0x0008, 0xAB1D);
  105. extern pascal void PortChanged(GrafPtr port)
  106.  FOURWORDINLINE(0x203C, 0x0004, 0x0009, 0xAB1D);
  107. extern pascal void GDeviceChanged(GDHandle gdh)
  108.  FOURWORDINLINE(0x203C, 0x0004, 0x000A, 0xAB1D);
  109. extern pascal void AllowPurgePixels(PixMapHandle pm)
  110.  FOURWORDINLINE(0x203C, 0x0004, 0x000B, 0xAB1D);
  111. extern pascal void NoPurgePixels(PixMapHandle pm)
  112.  FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xAB1D);
  113. extern pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  114.  FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xAB1D);
  115. extern pascal void SetPixelsState(PixMapHandle pm, GWorldFlags state)
  116.  FOURWORDINLINE(0x203C, 0x0008, 0x000E, 0xAB1D);
  117. extern pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  118.  FOURWORDINLINE(0x203C, 0x0004, 0x000F, 0xAB1D);
  119. extern pascal QDErr NewScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
  120.  FOURWORDINLINE(0x203C, 0x000E, 0x0010, 0xAB1D);
  121. extern pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  122.  FOURWORDINLINE(0x203C, 0x0004, 0x0011, 0xAB1D);
  123. extern pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  124.  FOURWORDINLINE(0x203C, 0x0004, 0x0012, 0xAB1D);
  125. extern pascal Boolean QDDone(GrafPtr port)
  126.  FOURWORDINLINE(0x203C, 0x0004, 0x0013, 0xAB1D);
  127. extern pascal long OffscreenVersion(void)
  128.  TWOWORDINLINE(0x7014, 0xAB1D);
  129. extern pascal QDErr NewTempScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
  130.  FOURWORDINLINE(0x203C, 0x000E, 0x0015, 0xAB1D);
  131. extern pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  132.  FOURWORDINLINE(0x203C, 0x0004, 0x0016, 0xAB1D);
  133. extern pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  134.  FOURWORDINLINE(0x203C, 0x0004, 0x0017, 0xAB1D);
  135.  
  136. #ifdef __CFM68K__
  137. #pragma lib_export off
  138. #endif
  139.  
  140. #if GENERATINGPOWERPC
  141. #pragma options align=reset
  142. #endif
  143.  
  144. #ifdef __cplusplus
  145. }
  146. #endif
  147.  
  148. #endif /* __QDOFFSCREEN__ */
  149.